package com.imooc.product.exception;

import com.imooc.product.enums.ResultEnum;

/**
 * @author : 浦希成
 * @date : 2018/7/30 10:16
 */
public class ProductException extends RuntimeException {
    private Integer code;
    public ProductException(Integer code,String msg){
        super(msg);
        this.code=code;
    }
    public ProductException(ResultEnum resultEnum){
        super(resultEnum.getMsg());
        this.code=resultEnum.getCode();
    }
}
